package cn.bitkit.assist.code.creator;

import cn.bitkit.assist.code.BaseCreator;
import cn.bitkit.tools.file.TextHelper;

public class MapperCreator extends BaseCreator {

	@Override
	public void create() {
		final String template = getTemplate("mapper.tpl");
		TextHelper builder = TextHelper.loadString(template);
		builder.setValue("rootPkg", projectVO.getRootPkg());
		builder.setValue("modelName", projectVO.getModuleName());
		builder.setValue("entityName", entityVO.getEntityName());
		builder.setValue("entityVar", entityVO.getEntityVar());
		String text = builder.getText();
		writeText(text, getJavaFile("mapper"));
	}

}
